package interfacer;


import utils.Log;

public class Test {


    public static void main(String[] args) {
        ApiEventListener listener = new ApiEventListener() {
            @Override
            public void onDataReceived(Object data) {
                Log.vn("onDataReceived, listener");
            }

            @Override
            public void onProgress(Object id, int progress) {

            }

            @Override
            public void onException(String code, String reason) {
                Log.vn("onException, listener");
            }
        };


        ApiEventListenerV1 listenerV1 = new ApiEventListenerV1() {
            @Override
            void onDataReceived(Object data) {
                Log.vn("onDataReceived, listenerV1");
            }

            @Override
            void onException(String code, String reason) {
                Log.vn("onException, listenerV1");
            }
        };

        ApiEventListenerV2 listenerV2 = new ApiEventListenerV2();


        listener.onDataReceived(null);
        listener.onException("1", "2");

        listenerV1.onDataReceived(null);
        listenerV1.onException("1", "2");


        listenerV2.onDataReceived(null);
        listenerV2.onException("1", "2");

        testV1(1, listenerV1);
    }


    static void testV1(int a, ApiEventListenerV1<String> b) {
        b.onDataReceived("1");
    }
}
